from tkinter import *
def callback():
    print(v.get())

def callback1():
    print(v1.get())
root = Tk()
v = IntVar()
v1 = StringVar()
Spinbox(root,from_ = 0,to = 99,textvariable = v,command = callback).pack()
Spinbox(root,values = ("张三","李四","老王"),textvariable = v1,command = callback1).pack()
mainloop()
